package com.lej.share.webJs

import android.webkit.JavascriptInterface
import androidx.fragment.app.FragmentActivity
import com.lej.core.daq.DAQEvent
import com.lej.core.webView.BaseJsInstance
import com.lej.share.ui.ShareCodeBottomSheetDialog

class ShareJsInstance(activity: FragmentActivity) : BaseJsInstance(activity) {
    override fun getInterfaceName() = "jsInstances"

    @JavascriptInterface
    ///调用客户端分享内容
    fun shareText(text: String) {
        DAQEvent.share_now.mobEvent()
        ShareCodeBottomSheetDialog.shareText(mActivity, text)
    }
}